package java_DesignPattern.CreatorPattern.SingletonPattern.hunger.method2;

/**
 * 单例模式测试类
 */
public class Test {
    public static void main(String[] args) {

        Singleton singleton1 = Singleton.getInstance();
        Singleton singleton2 = Singleton.getInstance();
        // 验证两个实例是否相同
        System.out.println(singleton1 == singleton2);
    }
}
